using AutoMapper;
using Volo.Abp.AutoMapper;
using TenantManagementService.Tenants;

namespace TenantManagementService
{
    /// <summary>
    /// TenantManagement模块AutoMapper配置
    /// </summary>
    public class TenantManagementServiceApplicationAutoMapperProfile : Profile
    {
        public TenantManagementServiceApplicationAutoMapperProfile()
        {
            // 基本实体到DTO映射 - 简化版本，避免复杂序列化
            CreateMap<Tenant, TenantDto>();
            CreateMap<TenantConfiguration, TenantConfigurationDto>();

            // 反向映射 - 实体创建在Service中手动处理
            CreateMap<TenantDto, CreateTenantDto>();
            CreateMap<TenantDto, UpdateTenantDto>();
            CreateMap<TenantConfigurationDto, UpdateTenantConfigurationDto>();
        }
    }
}